-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mu: run initialization command when personal addresses change #6100
base: master
Are you sure you want to change the base?
mu: run initialization command when personal addresses change #6100
Conversation
83b89fa
to
fd326d8
Compare
fd326d8
to
61873f8
Compare
This looks interesting! I have long tinkered with this kind of thing in my head. Does this also handle the case where you add/remove only some addresses/aliases? I would like to codify the expected behavior of changing a subset of the addresses as an actual test that Nix/home-manager can run if we do go down this road. |
On activation it asks
I agree, though it would involve testing the actual side-effects of activation over multiple runs, and I don't know if the current test infra allows that. |
I tried to get the integration tests working, but I can't get a working internet connection in the VMs. In any case I'm pretty sure the patch works, since I've been using it for the past couple weeks, during which I manipulated my email addresses (adding new aliases and accounts), and |
willing to merge but can't review. @KarlJoad could you test/review and confirm it works ? |
I can review, but cannot test on real-world stuff. I do not use home-manager anymore and I don't want to impact my current mail setup. I will post my review/approve by tonight CST. |
I'm not sure if I got the usage of |
In my opinion, a dry-run should do everything a normal run should do, except for any actual modifications, that way you (as the user) can see exactly what will happen, without anything actually changing. So dry-runs should check for currently-registered addresses. |
When the user changes which addresses mu should consider 'personal', mu's store should be reinitialized. After this change, the activation script parses the previously configured list of addresses and compares it with the new one. If they differ, it runs the init command even when the store has already been initialized.
61873f8
to
cab44ac
Compare
I agree; fixed the check in dry-run mode and rebased on master. |
Description
When the user changes which addresses mu should consider 'personal', mu's store should be reinitialized.
After this change, the activation script parses the previously configured list of addresses and compares it with the new one. If they differ, it runs the init command even when the store has already been initialized.
Checklist
Change is backwards compatible.
Code formatted with
./format
.Code tested through
nix-shell --pure tests -A run.all
ornix develop --ignore-environment .#all
using Flakes.Test cases updated/added. See example.
Commit messages are formatted like
See CONTRIBUTING for more information and recent commit messages for examples.
If this PR adds a new module
Maintainer CC
@KarlJoad